<template>
  <Breadcrumb />
  <el-card class="box-card">
    <el-table :data="tableData" border style="width: 100%">
      <el-table-column type="index" prop="address" label="" width="50" />
      <el-table-column prop="authName" label="权限管理" />
      <el-table-column prop="path" label="路径" />
      <el-table-column label="权限等级">
        <template v-slot="{row}">
          <el-tag v-if="row.level==='0'">一级</el-tag>
          <el-tag type="success" v-else-if="row.level==='1'">二级</el-tag>
          <el-tag type="danger" v-else>三级</el-tag>
        </template>
      </el-table-column>
    </el-table>
  </el-card>
</template>

<script setup>
import { ref } from 'vue'
import { limits } from '@/api/quanxian'
import Breadcrumb from '@/components/Breadcrumb.vue'

const tableData = ref([])
const getDataList = async () => {
  const res = await limits()
  tableData.value = res.data.data
  console.log(res)
}
getDataList()
</script>

<style scoped>
.el-card{
  margin-top: 15px;
}
</style>
